//
//  TicketBookingCell.m
//  ImGuider
//
//  Created by 王鹏宇 on 2018/1/3.
//  Copyright © 2018年 imguider. All rights reserved.
//

#import "TicketBookingCell.h"

@implementation TicketBookingCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.selectionStyle =  UITableViewCellSelectionStyleNone;
    self.bgView.backgroundColor = kBGColor;
    self.bgViewHeight.constant = 60;
    self.TicketTypeLabel.textColor = kSubitleColor;
}

- (void)configDataWith:(TicketTypeModel *)model {
    
    self.ticketTypeModel = model;
    self.TicketTypeLabel.text = model.title;
    self.priceLabel.text = model.smartPirce;
}

- (IBAction)bookingTicket:(id)sender {
    
    if (_delegate && [_delegate respondsToSelector:@selector(bookingTicketWithTicketType:)]) {
        
        [_delegate bookingTicketWithTicketType:self.ticketTypeModel.type.integerValue];
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
